﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System;

namespace MathUtils.Extensions
{
    public static class VectorExtensions
    {
        public static Vector2 NormalizeForTile(this Vector2 vector) 
        {
            if (vector.X == vector.Y)
                return new Vector2(Math.Sign(vector.X), Math.Sign(vector.Y));
            else
            {
                vector.Normalize();
            }
            return vector;
        }
    }
}
